Skip to content

Refactor to use native interfaces in OptimalBranching.jl - #13

Merged
isPANN merged 29 commits into
OptimalBranching:mainfrom
isPANN:xw/native_ob
Oct 20, 2025
Merged

isPANN merged 29 commits into
OptimalBranching:mainfrom
isPANN:xw/native_ob

Conversation

@isPANN

@isPANN isPANN commented Oct 18, 2025 •

Copy link
Copy Markdown
Collaborator

Performance after refactoring

Computation is efficient when the region includes only two tensors (as below); and, performance degrades as the region size increases.

+++++++++++++++++++++++++++++++++++++++++++++++++++++
| Config   | BooleanInference | IP-Gurobi.Optimizer |
-----------------------------------------------------
| 10x10    | 125.7ms         | 67.5ms          |
| 12x12    | 416.9ms         | 797.7ms         |
| 14x14    | 1.73s           | 1.63s           |
| 16x16    | 7.96s           | 7.6s            |
+++++++++++++++++++++++++++++++++++++++++++++++++++++

…acking.

- Introduce `set_debug_level!` for configurable debug options. - Update functions to include `SearchStatistics` for better performance analysis.
…sult` structure.

- Include `twosat.jl` in the Boolean inference module.
- Refactor branching functions to return `BranchResult` for improved clarity and performance.
- Update debug logging to utilize the new `@dbg` macro for better control over logging levels.
- Rename `vec2tensor` to `vec_to_tensor` and `lluint2vec` to `longlonguint_to_vec` for better readability.
- Update corresponding function calls and tests to reflect the new names.
- Improve comments for better understanding of the code logic.
…function.

- Add detailed debug logging for branching attempts, including propagated variables and remaining constraints.
- Refactor `deduction_reduce` to use `append!` for modifying the reducing queue.
- Optimize `subhg` function to improve performance by using a set for decided vertices and reducing iterations.
- Replace `region_cache.jl` with direct region management in `problems.jl`.
- Update variable and tensor ID handling to use `Int` instead of custom structs.
- Enhance debug logging in various functions for better traceability.
- Refactor function signatures and internal logic for consistency and clarity.
@isPANN
isPANN marked this pull request as draft October 18, 2025 16:17
@codecov

codecov Bot commented Oct 18, 2025

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@isPANN

isPANN commented Oct 18, 2025 •

Copy link
Copy Markdown
Collaborator Author

Tasks to be complemented

  • test branching with priority queue
  • compare performance with kissat, minisat (DIMACS CNF file)

@isPANN
isPANN marked this pull request as ready for review October 20, 2025 14:07
@isPANN isPANN changed the title [Do not merge] Refactor to use native interfaces in OptimalBranching.jl Refactor to use native interfaces in OptimalBranching.jl Oct 20, 2025
@isPANN
isPANN merged commit 3dd7112 into OptimalBranching:main Oct 20, 2025
4 checks passed
GiggleLiu pushed a commit that referenced this pull request Dec 8, 2025
Refactor to use native interfaces in `OptimalBranching.jl`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant